<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<link rel="stylesheet" href="http://localhost/obj/movier/Template/default/css/inc.css" />
	<link rel="stylesheet" href="http://localhost/obj/movier/Template/default/css/public.css" />
	<!--[if IE 7]>
		<link rel="stylesheet" href="http://localhost/obj/movier/Template/default/css/ico-ie7.css">
	<![endif]-->
	<script type="text/javascript" src="http://localhost/obj/movier/Template/default/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="http://localhost/obj/movier/Template/default/js/public.js"></script>
	<script type="text/javascript" src="http://localhost/obj/movier/Template/default/js/slide.js"></script>
	<title>剧集 - <?php echo $const['webname'];?></title>
	<script type="text/javascript">
		var xid="<?php echo $field['xid'];?>";
	</script>
	<script type="text/javascript" src="http://localhost/obj/movier/Template/default/Xilie/js/js.js"></script>
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?></head>
<body>
	<!-- 顶部开始 -->
	<div class="bgblack">
		<div class="w1200 auto p5 bgblack">
			<a class="white-2 af mr20" href="http://localhost/obj/movier">老地方电影</a>
		</div>
	</div>
	<!-- 顶部结束 -->
	<!-- menu开始 -->
	<div class="h65 bgwhite rel zix2 fixMenu">
		<div class="w1200 auto h65 rel fix">
			<div class="logo t0 l0 w100 h65 l mr30"><img src="http://localhost/obj/movier/Template/default/img/logo.png" alt="" /></div>
			<ul class="l fm rel menu">
					<li class="l lh60 mr30" act="1"><a class="w50 tc dib f16 black" href="http://localhost/obj/movier">首页</a></li>
						<?php
		$re = M('category')->limit(5)->where('pid=0')->all();
		foreach ($re as $c) :
			if(26==$c['cid']) $c['act']='act="1"';
			$c['url']=U($c['url'],array('cid'=>$c['cid'],'nav'=>$c['cid']));
		?>
					<li class="l lh60 mr30" <?php echo $c['act'];?>><a class="w50 tc dib f16 black" href="<?php echo $c['url'];?>"><?php echo $c['cname'];?></a></li>
				<?php endforeach ;?>
				<span class="movebg dib w50 bgblue h4 abs b0 l0"></span>
			</ul>
			<div class="r abs t20 r10">
				<form action="<?php echo U('search/index');?>" method="get" class="dib ">
					<div class="dib bdc w200 rel">
						<input class="p5 pct80 bd0" type="text" name="keys" />
						<input type="submit" class="hand gray abs t3 r5 bd0 search" value="&emsp;&ensp;" />
					</div>
				</form>
				<p class="p5 dib fm ml10">
					<?php if($_SESSION['user']['uid']){?>
						<span class="f14 black mr10">欢迎您： <a class="gray a f14" href="<?php echo U('User/index');?>"><i class="icon-user mr3 gray"></i><?php echo $_SESSION['user']['email'];?> [ <?php echo $_SESSION['user']['nickname'];?> ]</a></span>
						<a class="f14 black" href="<?php echo U('User/out');?>"><i class="icon-signout mr3 gray"></i>退出</a>
						<?php if($_SESSION['user']['level'] > 0){?>
							| <a class="f14 blue5 tsblack" href="http://localhost/obj/movier?a=admin">后台管理</a>
							<?php if($_SESSION['user']['level'] == 9){?><span class="p2 pl5 pr5 rad50 white bgmaroon">超</span><?php }?>
						<?php }?>
					<?php  }else{ ?>
						<a class="f14 black mr10" href="<?php echo U('User/login');?>">登录</a>
						<a class="f14 black" href="<?php echo U('User/reg');?>">注册</a>
					<?php }?>
					
				</p>
			</div>
		</div>
	</div>
	<!-- menu结束 -->


	<!-- 内容开始 -->
	<div class="w1180 auto mt20 fix p5">
		<div class="fm mb30 h600 bgteal white">
			<object width="100%" height="600"  type="application/x-shockwave-flash" data="<?php echo $field['firstUrl'];?>">
			<param value="<?php echo $field['firstUrl'];?>" name="movie">
			<param name="wmode" value="transparent">
			<param name="allowFullScreen" value="true">
			<param name="allowScriptAccess" value="always">
			<param name="flashvars" value="isAutoPlay=false&quality=high">
			<embed src="<?php echo $field['firstUrl'];?>"  allowscriptaccess="always" wmode="Opaque" quality="high" allowfullscreen="true" type="application/x-shockwave-flash"></embed>
			</object>
		</div>
		<!-- 左侧开始 -->
		<div class="f w860 mr20 l">
			<div class="bsd1 bgwhite pt10">
				<div class="lh50 pl20 fm b rel f18">
					【<?php echo $field['title'];?>】 
					<?php if(field.jname){?>
						<?php echo mb_substr($field['jname'],0,16,'utf8');?>
					<?php }?>
					 <?php echo $field['num'];?>	
					<span class="p5 fs n f14 orange"><?php echo getXilieComp($field['comp']);?>更新</span>
					<!-- 分享开始 -->
					<div class="dib r mt10 mr10">
						<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone"></a><a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina"></a><a title="分享到腾讯微博" href="#" class="bds_tqq" data-cmd="tqq"></a><a title="分享到人人网" href="#" class="bds_renren" data-cmd="renren"></a><a title="分享到微信" href="#" class="bds_weixin" data-cmd="weixin"></a></div>
						<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
					</div>
					<!-- 分享结束 -->
				</div>
				<div class="p10 f14 ml10 of">
					<span class="bgblue1 white f14 p5 pl10 pr10">追我</span>
					已有<span class="gray"><?php echo $field['fllow'];?></span>人追过该系列 <span class="gray ml100">更新到第<?php echo $field['act'];?>集</span>
					<div class="mt20 fm f16 w500 l mr30" id="juji">
						<?php 
							$t=count($field['juji']);
							$i=1;
							foreach ($field['juji'] as $ju) :
								if(isset($_GET['num'])) $act = ($_GET['num']==$t) ?'bgblue':'bgwhite-5';
								if($i==1):
						?>
							<a href="<?php echo U('content',array('num'=>$t,'jid'=>$ju['jid'],'xid'=>$_GET['xid'],'cid'=>$_GET['cid']));?>" class="bgblue <?php echo $act;?> p5 btn dib mr10 rel mt5 white new"><?php echo $t ;?></a>
						<?php else: ?>
							<a href="<?php echo U('content',array('num'=>$t,'jid'=>$ju['jid'],'xid'=>$_GET['xid'],'cid'=>$_GET['cid']));?>" class="<?php echo $act;?> p5 btn  dib  mr10 rel mt5 black3"><?php echo $t ;?></a>
						<?php endif; $i++;$t--; endforeach; ?>
					</div>
					<div class="ding l w200 fix p20 ml30">
						<div class="le">
							<p class="dingT orange3 fg f22 tc b"><?php echo $field['ding'];?></p>
							<p class="tc"><a stat="1" href="<?php echo U('ding');?>" onclick="return ding(this)" class="di"></a></p>
						</div>
						<div class="ri">
							<p class="downT orange3 fg f22 tc b"><?php echo $field['down'];?></p>
							<p class="tc"><a stat="0" href="<?php echo U('ding');?>" onclick="return ding(this)" class="di"></a></p>
						</div>
					</div>
				</div>
				
			</div>
			<!-- 评论区域开始 -->
			<div class="f w860 bsd1 mr20 l bgwhite mt20 pb10 pt10">
				<div class="lh30 pl20 fm b rel f14"><span class="mr10">系列影片点评</span> <span class="gray1">已有 <b id="commentNumDown"><?php echo $field['comments'];?></b> 条短评</span> <b class="abs bgblue h30 w5 f0 l-5 t0"></b></div>
				<div class="bbd ml20 mr20 mt10 pb10 pl80 rel">
					<div class="abs l0"><a class="dib bdc"> <img src="http://localhost/obj/movier/Template/default/img/logo.png" alt="" /></a></div>
					<form action="<?php echo U('XilieComment/add');?>" method="post" onsubmit="return ajax(this);">
						<input type="hidden" name="xid" value="<?php echo $field['xid'];?>" />
						<textarea class="p5" name="content" id="commcont" cols="140" rows="5"></textarea>
						<p class="p5 tr mt10">
							<span class="gray">还可以发表 <span class="zishu red fg f14 b">2000</span> 字</span>
							<input type="submit" class="btn bgblue" value="发表评论" />
						</p>
					</form>
				</div>
				<div id="commentWrap">
					<!-- 用户评论 -->
					<!-- <div class="bbd ml20 mr20 mt10 pb10 pl80 rel">
						<div class="abs l0"><a class="dib bdc"> <img src="http://localhost/obj/movier/Template/default/img/logo.png" alt="" /></a></div>
						<div class="p5">
							<p class="gray p5"><a class="gray f12" href="">老地方</a></p>
							<p class="p5 f14">没有星爷的声音，就不是星爷的电影了。</p>
							<p class="gray p5 f12">2014-5-24 05:05:46</p> -->
							<!-- 用户评论引用 -->
							<!-- <div class="btd ml20 mr20 mt10 pb10 pt10 pl80 rel">
								<div class="abs l0"><a class="dib bdc"> <img src="http://localhost/obj/movier/Template/default/img/logo.png" alt="" /></a></div>
								<div class="p5">
									<p class="gray p5"><a class="gray f12" href="">老地方</a></p>
									<p class="p5 f14">没有星爷的声音，就不是星爷的电影了。</p>
									<p class="gray p5 f12">2014-5-24 05:05:46</p>
								</div>
							</div> -->
							<!-- 用户评论引用结束 -->
						<!-- </div>
					</div> -->
					<!-- 用户评论结束 -->
				
					<!-- 用户评论 -->
					<?php $hd["list"]["c"]["total"]=0;if(isset($comment) && !empty($comment)):$_id_c=0;$_index_c=0;$lastc=min(1000,count($comment));
$hd["list"]["c"]["first"]=true;
$hd["list"]["c"]["last"]=false;
$_total_c=ceil($lastc/1);$hd["list"]["c"]["total"]=$_total_c;
$_data_c = array_slice($comment,0,$lastc);
if(count($_data_c)==0):echo "";
else:
foreach($_data_c as $key=>$c):
if(($_id_c)%1==0):$_id_c++;else:$_id_c++;continue;endif;
$hd["list"]["c"]["index"]=++$_index_c;
if($_index_c>=$_total_c):$hd["list"]["c"]["last"]=true;endif;?>

						<div class="bbd ml20 mr20 mt10 pb10 pl80 rel">
							<div class="abs l0">
								<a class="dib bdc">
									<?php if(!$c['pic']){?>
										<img src="http://localhost/obj/movier/Template/default/img/logo.png" alt="" />
									<?php  }else{ ?>
										<img src="http://localhost/obj/movier/<?php echo $c['pic'];?>" width="65" height="65" alt="" />
									<?php }?>
								</a>
							</div>
							<div class="p5">
								<p class="gray p5"><a class="gray f12" href=""><?php echo $c['email'];?> [<?php echo $c['nickname'];?>]</a></p>
								<p class="p5 f14"><?php echo $c['content'];?></p>
								<p class="gray p5 f12"><?php echo hd_date($c['addtime'],'Y-m-d H:i:s');?></p>
							</div>
						</div>
					<?php $hd["list"]["c"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
					<!-- 用户评论结束 -->
					<!-- 分页 -->
					<div class="pageAjax page mt10"> <?php echo $page;?> </div>
				</div>
			</div>
			<!-- 评论区域结束 -->
		</div>
		<!-- 左侧结束 -->
		<!-- 右侧开始 -->
		<div class="f w300 l">
			<div class="bsd2 bde bgwhite">
				<div class="lh30 pl20 fm b rel mt10">影片介绍 <b class="abs bgblue h30 w5 f0 l-5 t0">&nbsp;</b></div>
				<div class="p20 gray lh20">
					<?php echo $field['intros'];?>
				</div>
			</div>
			
			<div class="bsd2 bde mt20 bgwhite">
				<div class="lh30 pl20 fm b rel mt10">更多系列 <b class="abs bgblue h30 w5 f0 l-5 t0">&nbsp;</b></div>
				<div class="p10">
							<?php
		$i=0;
		$re = M('xilie')->limit(10)->order('xid DESC')->all();
		foreach ($re as $x) :
			$i++;
			$mod = ($i%2)?20:0;
			$x['urls']=U('Xilie/content',array('cid'=>$_GET['cid'],'xid'=>$x['xid']));
			$x['mod']=$mod;
		?>
						<a href="<?php echo $x['urls'];?>" class="mr<?php echo $x['mod'];?> dib w125 black fm f14 tc mt10 bgblack"><img class="w125 h175 img5" src="http://localhost/obj/movier/<?php echo $x['pic'];?>" alt="<?php echo $x['title'];?>" /><span class="p5 dib bgwhite pct100"><?php echo $x['title'];?></span></a>
					<?php endforeach ;?>
				</div>
			</div>
		</div>
		<!-- 右侧结束 -->
	</div>
	<!-- 内容结束 -->

<!-- 登陆区域 -->
<div id="Login" class="dn">
	<div class="w600 fm mt20">
		<form action="<?php echo U('User/login');?>" method="post" onsubmit="return loginAjax(this);">
			<p class="p10 fix">
				<span class="w100 dib mr15 tr f14">常用邮箱</span>
				<input name="email" type="text" class="pct50 p5 f14" />
			</p>
			<p class="p10 fix mt20">
				<span class="w100 dib mr15 tr f14">密码</span>
				<input name="pwd" type="password" class="pct50 p5 f14" />
			</p>
			<p class="p10 fix mt20">
				<span class="w100 dib mr15 tr f14"></span>
				<label for="au">
					<input name="auto" type="checkbox" id="au" class="" checked="" /> 下次自动登陆
				</label>
				<!-- <a href="" class="ml30 pl30">忘记密码了</a> -->
			</p>
			<p class="p10 fix f18 mt20">
				<span class="w100 dib mr15 tr f14"></span>
				<input type="submit" class="btn bgblue pct50" value="登 陆" />
			</p>
			<p class="p10 fix mt20">
				<span class="w100 dib mr30 tr f14"></span>
				<span class=" dib tr f14">
					还没有账号？ <a href="<?php echo U('User/reg');?>">立即注册</a>
				</span>
			</p>
		</form>
	</div>
</div>
<!-- 登陆区域结束 -->


<script type="text/javascript">
	var sessionUid = '<?php echo $_SESSION['user']['uid'];?>';
	var sessionEmail = '<?php echo $_SESSION['user']['email'];?>';
	var sessionNickName = '<?php echo $_SESSION['user']['nickname'];?>';
	var loginHtml = $('#Login').clone();
	function ajax(id){ //发表评论
		var url = $(id).attr('action'),
			cont = $(id).find('[name=content]'),
			warp = $('#commentWrap');
		$.post(url,$(id).serialize(),function(re){
			if(re.state){
				h='\
				<div class="bbd ml20 mr20 mt10 pb10 pl80 rel">\
					<div class="abs l0"><a class="dib bdc"> <img src="http://localhost/obj/movier/Template/default/img/logo.png" alt="" /></a></div>\
					<div class="p5">\
						<p class="gray p5"><a class="gray f12" href="">'+sessionEmail+' ['+sessionNickName+']</a></p>\
						<p class="p5 f14">'+re.data.content+'</p>\
						<p class="gray p5 f12">'+re.data.addtime+'</p>\
					</div>\
				</div>\
				';
				$.msg({
					str:re.msg,
					close:function(){
						cont.focus();
					}
				})
				cont.val('');
				warp.prepend(h);
				var dn = Number($('#commentNumDown').text())+1;
				$('#commentNumDown').text(dn);
			}else{
				alert(re.msg);
			}
		},'json')
		return false;
	}

	$('#commcont').click(function(){
		checkLogin();
	})
	
</script>





<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?>	<!-- 底部开始 -->
	<div class="bgblack h100 white-2 mt20">
		<!-- <div class="fs tc pt10">
			<a href="" class="dib p5 white-2">合作推广</a>
			<a href="" class="dib p5 white-2">联系我们</a>
			<a href="" class="dib p5 white-2">加入我们</a>
		</div> -->
		<div class="pt20">
			<p class="tc p5"><?php echo $const['bottom1'];?></p>
			<p class="tc p5"><?php echo $const['bottom2'];?></p>
		</div>
	</div>
	<!-- 底部结束 -->
</body>
</html>